package com.ynwt.controller;

import com.ynwt.service.WeixinManagerService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created by huangying on 2017/4/27.
 */
@RestController
@RequestMapping("/api")
public class ManageController {

    @RequestMapping(value = "menu")
    private String createMenu() {
        try {
            weixinManagerService.deleteMenu();
            weixinManagerService.createMenu();
            return "创建成功！";
        } catch (Exception e) {
            e.printStackTrace();
            return "创建失败！";
        }
    }

    @Autowired
    private WeixinManagerService weixinManagerService;

}
